import 'package:flutter/material.dart';
import 'package:wy/utils/screen_util.dart';
import 'package:wy/widgets/img_button.dart';

class HControlPanel1 extends StatelessWidget {
  final bool heart;
  final VoidCallback onUnheart;
  final VoidCallback onHeart;
  final VoidCallback onDownload;
  final VoidCallback onBell;
  final VoidCallback onCommen;
  final VoidCallback onPlayInfo;

  const HControlPanel1({
    Key key,
    this.heart = false,
    this.onUnheart,
    this.onHeart,
    this.onDownload,
    this.onBell,
    this.onPlayInfo,
    this.onCommen,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final screen = Screen(context);
    return Container(
        height: screen.calc(55),
        margin: EdgeInsets.only(bottom: screen.calc(14)),
        child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
          Center(
            child: heart
                ? GestureDetector(
                    onTap: onUnheart,
                    child: Image.asset('assets/images/icon-heart-w-fill.png',
                        width: screen.calc(55), height: screen.calc(55)))
                : GestureDetector(
                    onTap: onHeart,
                    child: Image.asset('assets/images/icon-heart-w.png',
                        width: screen.calc(55), height: screen.calc(55))),
          ),
          Center(
              child: ImgButton('assets/images/icon-download-w.png',
                  onTap: onDownload,
                  width: screen.calc(55),
                  height: screen.calc(55))),
          Center(
            child: ImgButton('assets/images/icon-bell-w.png',
                onTap: onBell, width: screen.calc(55), height: screen.calc(55)),
          ),
          Center(
            child: ImgButton('assets/images/icon-message-w.png',
                onTap: onCommen,
                width: screen.calc(55),
                height: screen.calc(55)),
          ),
          Center(
            child: GestureDetector(
              onTap: onPlayInfo,
              child: Image.asset('assets/images/icon-3dot-w.png',
                  width: screen.calc(55), height: screen.calc(55)),
            ),
          ),
        ]));
  }
}
